1. Field of the Invention
The present invention relates generally to graphics information processing, and in particular to methods and mechanisms for performing chroma downsampling.
2. Description of the Related Art
Computing devices and in particular mobile devices often have limited memory resources and a finite power source such as a battery. Computing devices with displays usually include different types of graphics hardware to manipulate and display video and images. Graphics hardware can perform many different types of operations to generate and process images intended for a display. One common operation performed by graphics hardware is the downsampling of chroma pixel components.
Chroma pixel components are downsampled (i.e., subsampled) to compress the amount of data used to encode an image or video stream. The terms “downsample” and “subsample” may be used interchangeably throughout this disclosure. The term ‘downsampling’ may herein be used to refer to, among other things, the change in color format of an image from a first color format to a second color format in which the number of chroma samples relative to luma samples in the first color format is higher than in the second color format. In other words, ‘downsampling’ reduces the number of chroma samples in the image, while leaving the number of luma samples unchanged.
In some widely-used formats (e.g., YCbCr), images may be transmitted with a brightness component (luminance) and two color components (chrominance). The YCbCr color space format (also referred to as YUV) utilizes a luma signal ‘Y’ to represent brightness, and color difference (or chroma) signals ‘Cb’ (representing blue) and ‘Cr’ (representing red) to represent blue and red color differences, respectively. Generally speaking, the human eye has less spatial acuity to the color information than to the luminance information, and so the amount of information devoted to the color components may be reduced without noticeably altering the image as it is perceived by the human eye.
There are several types of image and video formats that are commonly used to encode pixel information. Within the YCbCr format, several format variations may be used, such as chroma subsampling formats (i.e., ratios) 4:4:4, 4:2:2, and 4:2:0. The format 4:4:4 does not utilize subsampling, and so each of the three Y, Cb, and Cr components has the same sample rate. The term 4:2:2 refers to the ratio of the number of Y signal samples to the number of Cb and Cr signal samples in the color scheme. The format 4:2:2 indicates that for every four Y samples, the Cb and Cr signals are each sampled twice. On a pixel basis, this can be restated as for every pixel pair, there are two luma samples (Y1 and Y2) and a Cb and Cr shared among the two luma samples.
The format 4:2:0 specifies that for every four luma samples, the Cb and Cr signals are each sampled once. The first number of the 4:2:0 color format “4” represents the number of luma samples as a baseline. The second number “2” represents a defined horizontal subsampling with respect to the luma samples. The third number “0” represents a defined vertical subsampling, which in this case is a 2:1 vertical subsampling.
Typically, buffers are utilized to store pixel data in order to perform chroma downsampling on an image to generate the 4:2:2 or 4:2:0 formats. However, these buffers require large amounts of silicon area and can consume additional power, increasing the cost of the graphics hardware and reducing the battery life of mobile devices.